﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using RecruitStudents.Utility;

namespace RecruitStudents.Client.WS
{
    /// <summary>
    /// CommService 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消注释以下行。 
    // [System.Web.Script.Services.ScriptService]
    public class CommService : WS.Helper.BaseServiceHelper
    {
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>获取考试级别Table</i></b>")]
        public string GetExamLevelTable()
        {
            return ServiceBLLComm.GetExamLevelTable().ToJson();
        }
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>获取系统服务器时间</i></b>")]
        public string GetSystemDateTime()
        {
            return DateTime.Now.DateTimeToyyyy_MM_dd_HH_mm_ss();
        }
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>保存系统配置表信息</i></b>
            <br><font color='blue'>string</font> strJson:List数据Json")]
        public string SaveSystemInfo(string strJson)
        {
            return ServiceComm.SaveSystemInfo(strJson).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>获取字典表数据DataTable</i></b>
            <br><font color='blue'>string</font> strTableName:Table名称")]
        public string GetDicDataTableByDicTableName(string strTableName)
        {
            return ServiceComm.GetDicDataTableByDicTableName(strTableName).ToJson();
        }

        #region 用户登陆
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>用户登陆方法</i></b>
            <br><font color='blue'>string</font> strLoginName:用户名
            <br><font color='blue'>string</font> strPassWord:密码")]
        public string GetUserLogin(string strLoginName, string strPassWord)
        {
            return ServiceComm.GetUserLogin(strLoginName, strPassWord).ToJson();
        }
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据用户角色ID获取角色权限</i></b>
            <br><font color='blue'>string</font> strRoleID:角色ID")]
        public string GetRoleAuthModuleTable(string strRoleID)
        {
            return ServiceComm.GetRoleAuthModuleTable(strRoleID).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据值获取系统配置表中的数据</i></b>
            <br><font color='blue'>string</font> strSystemInfoID:数据ID，可以用逗号隔开查询")]
        public string GetSystemInfoDataTable(string strSystemInfoID)
        {
            return ServiceComm.GetSystemInfoDataTable(strSystemInfoID).ToJson();
        }
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据值获取系统配置表中的数据</i></b>
            <br><font color='blue'>string</font> strSystemInfoID:数据ID")]
        public string GetSystemInfoModel(string strSystemInfoID)
        {
            return ServiceComm.GetSystemInfoModel(strSystemInfoID).ToJson();
        }
        #endregion

        #region CS端登陆的时候选择考点/专业/级别/考场
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据考务表获取已分配的考点</i></b>")]
        public string GetExamPlaceTableALL_CS()
        {
            return ServiceComm.GetExamPlaceTableALL_CS().ToJson();
        }
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据考点获取专业</i></b>
            <br><font color='blue'>string</font> strExamPlaceID:考点")]
        public string GetSpecialityKindsTableByExamPlaceID_CS(string strExamPlaceID)
        {
            return ServiceComm.GetSpecialityKindsTableByExamPlaceID_CS(strExamPlaceID).ToJson();
        }
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据考点专业获取考试级别</i></b>
            <br><font color='blue'>string</font> strExamPlaceID:考点
            <br><font color='blue'>string</font> strSpecialityKindsNO:专业")]
        public string GetExamLevelByPlaceID_Speciality_CS(string strExamPlaceID, string strSpecialityKindsNO)
        {
            return ServiceComm.GetExamLevelByPlaceID_Speciality_CS(strExamPlaceID, strSpecialityKindsNO).ToJson();
        }
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据考点专业级别获取考场</i></b>
            <br><font color='blue'>string</font> strExamPlaceID:考点
            <br><font color='blue'>string</font> strSpecialityKindsNO:专业
            <br><font color='blue'>string</font> strExamLevel:级别")]
        public string GetExamRoomByPlaceID_Speciality_Level_CS(string strExamPlaceID, string strSpecialityKindsNO, string strExamLevel)
        {
            return ServiceComm.GetExamRoomByPlaceID_Speciality_Level_CS(strExamPlaceID, strSpecialityKindsNO, strExamLevel).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据考点专业级别获取考务信息</i></b>
            <br><font color='blue'>string</font> examLevel:级别
            <br><font color='blue'>string</font> examPlaceID:考点
            <br><font color='blue'>string</font> specialityKindsNO:专业")]
        public string GetEntretenimientohModel(string examLevel, string examPlaceID, string specialityKindsNO)
        {
            return ServiceComm.GetEntretenimientohModel(examLevel, examPlaceID, specialityKindsNO).ToJson();
        }

        #endregion

        #region 报名专用
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据身份证号码解析出出生日期，性别 List<string></i></b>
            <br><font color='blue'>string</font> strIdentityCard:身份证号码")]
        public string GetBirthSexByIdCard(string strIdentityCard)
        {
            return ServiceBLLComm.GetBirthSexByIdCard(strIdentityCard).ToJson();
        }
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据高考号获取生源地,如果解析出一个生源地只读，大于一个可以让用户来进行选择报考 DataTable</i></b>
            <br><font color='blue'>string</font> strNMT_SignUpID:高考报名号")]
        public string GetProviceTable(string strNMT_SignUpID)
        {
            return ServiceBLLComm.GetProviceTable(strNMT_SignUpID).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>获取考点列表 DataTable</i></b>")]
        public string GetExamPlaceTable()
        {
            return ServiceBLLComm.GetExamPlaceTable().ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>获取考点列表（报名专用，需要用生源地过滤） DataTable</i></b>
            <br><font color='blue'>string</font> strExamProvince:生源地")]
        public string GetExamPlaceTable_ExamProvince_Limt(string strExamProvince)
        {
            return ServiceBLLComm.GetExamPlaceTable(strExamProvince).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据考点获取专业（报名专用，需要用性别过滤） DataTable</i></b>
            <br><font color='blue'>string</font> strExamPlaceNO:考点
            <br><font color='blue'>string</font> strSex:性别（0或1）")]
        public string GetSpecialityKindsTableByExamPlaceID(string strExamPlaceNO, string strSex)
        {
            return ServiceBLLComm.GetSpecialityKindsTableByExamPlaceID(strExamPlaceNO, strSex).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据考点,专业,级别获取分组  兼容报名获取初试考试时间    DataTable</i></b>
            <br><font color='blue'>string</font> strExamPlaceNO:考点
            <br><font color='blue'>string</font> strSpecialityKindsNO:专业
            <br><font color='blue'>string</font> strExamLevel:级别")]
        public string GetAppointmentGroupDataTable(string strExamPlaceNO, string strSpecialityKindsNO, string strExamLevel)
        {
            return ServiceBLLComm.GetAppointmentGroupDataTable(strExamPlaceNO, strSpecialityKindsNO, strExamLevel).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>验证身份证号或高考报名号是否存在  JsonMessage</i></b>
            <br><font color='blue'>string</font> strIdCard:身份证号
            <br><font color='blue'>string</font> strNMT_SignUpID:高考报名号
            <br><font color='blue'>string</font> strFlag:(0身份证1高考号)")]
        public string StudentInfoModify_CheckIsRegist(string strIdCard, string strNMT_SignUpID, string strFlag)
        {
            return ServiceBLLComm.StudentInfoModify_CheckIsRegist(strIdCard, strNMT_SignUpID, strFlag).ToJson();
        }
        #endregion

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>根据考场号获取考官  DataTable</i></b>
            <br><font color='blue'>string</font> strExamRoomID:考场")]
        public string GetTeacherList(string strExamRoomID)
        {
            return ServiceComm.GetTeacherList(strExamRoomID).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>通过考务ID获取考场列表  DataTable</i></b>
            <br><font color='blue'>string</font> strExamRoomID:考务")]
        public string GetExamRoomTableByEntretenimientohID(string EntretenimientohID)
        {
            return ServiceComm.GetExamRoomTableByEntretenimientohID(EntretenimientohID).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>获取专业列表  DataTable</i></b>
            <br><font color='blue'>string</font> strExamYear:考试年度")]
        public string GetSpecialityKindsTable(string strExamYear)
        {
            return ServiceComm.GetSpecialityKindsTable(strExamYear).ToJson();
        }


        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>生成准考证号</i></b>")]
        public string CreateExamAllowExamID(string strExamPlaceID, string strSpecialityKindsNO, string strExamYear)
        {
            return ServiceBLLComm.CreateExamAllowExamID(strExamPlaceID, strSpecialityKindsNO, strExamYear);
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>生成订单编号</i></b>")]
        public string CreateOrderNo()
        {
            return ServiceBLLComm.CreateOrderNo();
        }


        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>生成抽签序号</i></b>")]
        public string CreateExamLotNO(string strExamPlaceNO, string strExamLevel, string strSpecialityKindsNO, string strExamYear)
        {
            return ServiceBLLComm.CreateExamLotNO(strExamPlaceNO, strExamLevel, strSpecialityKindsNO, strExamYear);
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>生成抽签号,开始号和最大号</i></b>")]
        public string CreateLotteryNO(string appointmentgroupid)
        {
            return ServiceBLLComm.CreateLotteryNO(appointmentgroupid);
        }
        
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>生源地信息</i></b>")]
        public string GetExamProvinceDataTable()
        {
            return ServiceBLLComm.GetExamProvinceDataTable().ToJson();
        }
        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>获取日志表</i></b>")]
        public string GetEaxmLogTable(string strSigUpID, string strSignUpStudentsSpecialityID, string strSpecialityKindsNO, string strExamPlaceNo)
        {
            return ServiceBLLComm.GetEaxmLogTable(strSigUpID, strSignUpStudentsSpecialityID, strSpecialityKindsNO, strExamPlaceNo).ToJson();
        }

        [SoapHeader("MyHeader")]
        [WebMethod(Description = @"<b><i>保存日志表</i></b>")]
        public string SaveExamLog(string strJson)
        {
            return ServiceBLLComm.SaveExamLog(strJson).ToJson();
        }
    }
}
